home *** CD-ROM | disk | FTP | other *** search
/ The World's Largest Collection of Windows Software / The World's Largest Collection of Windows Software - Disc 1.iso / connect / _j2 / wsmtpd16 / abstract.txt next >
Text File  |  1993-10-09  |  3KB  |  57 lines

  1.                             Windows SMTP Server
  2.                             for Windows Sockets
  3.                                    v1.61
  4.                            Sunday, October 8, 1993
  5.  
  6.                             Technical Abstract
  7.  
  8.  
  9.     This is a demonstration application of the Windows Sockets v1.1 API.
  10. This application only talks to SMTP "clients" according to the RFC822
  11. specification, and to the sendmail variations.
  12.     The application is cut into two almost separate parts. The NET.C
  13. portion that handles incoming connections and data, and the WSMTPSRV.C
  14. portion that actually does the SMTP "language" and the dialog box front-
  15. end. By keeping a separate SMTPCLIENT structure for each connection,
  16. the "state" of the connection can be monitored - and a separate FIFO
  17. buffer can be handled. By using a "net" FIFO side, and a "client" FIFO
  18. side, each separate part can be completely oblivious to each other. In
  19. fact, the WSMTPSRV side is completely oblivious to the network - if you
  20. realize it only uses netInit() and clientSendLine() and clientReceiveLine()
  21. to handle data.
  22.     The server is a state machine. It can either be in a COMMAND state, or a
  23. WAIT FOR DOT state (for SMTP commands, or DATA messages). After each line
  24. is received from COMMAND state, it goes through a simple smtpParser() that
  25. handles each command. If the line was received during WAIT FOR DOT, it is
  26. added to the temporary mail file opened in the CMD_DATA case. If no more
  27. lines remain in the FIFO receive buffer, the smtpServer() routine returns.
  28. It will regain control again once more information is received in NET.C.
  29.     The network portion is relatively simple as well. As a new connection
  30. comes in, smtpAddClient() adds this accept()'ed socket to the client
  31. array in the first open position. When the socket receives data,
  32. netReceiveData() is called to update the FIFO, and smtpServer() is called
  33. if something came in - this slighty breaks the distinction between the
  34. two portions. A better way to do it is probably to have the "language"
  35. portion register itself with the network procedure - this might suggest
  36. a DLL SMTPD in the future! Interested?
  37.  
  38. For further information on Windows Sockets:
  39. ftp ftp.microdyne.com      /pub/winsock/winsock-1.1/
  40. ftp sunsite.microdyne.com  /pub/micro/pc-stuff/ms-windows/winsock/winsock-1.1/
  41.  
  42. For further information on SMTP:
  43. {Basis of this program}
  44. RFC821 SIMPLE MAIL TRANSFER PROTOCOL, Jonathan B. Postel
  45. RFC822 Mail address formats
  46.  
  47. {Currently working on the following}
  48. RFC1425 SMTP Service Extensions
  49. RFC1426 SMTP Service Extension for 8bit-MIME transport
  50. RFC1427 SMTP Service Extension for Message Size Declaration
  51. RFC1428 Transition of Internet Mail from Just-Send-8 to 8bit-SMTP/MIME
  52.  
  53. {Used some of Sendmail's source as a guide  }
  54. {NO CODE STOLEN, it wasn't very portable ;) }
  55. Sendmail source code from BSD4.3-Reno
  56.  
  57.